import request from '@/utils/request'

export function login(data) {
  return request({
    url: 'login',
    method: 'post',
    data
  })
}

export function getInfo(data) {
  return request({
    url: '/zxw/company/',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: 'logout',
    method: 'get'
  })
}

export function test() {
  return request({
    url: 'test/test',
    method: 'get'
  })
}

export function getBanks() {
  return request({
    url: 'dict/banks',
    method: 'get'
  })
}

export function getEnterprise(params) {
  return request({
    url: 'q/enterprise',
    method: 'get',
    params
  })
}

export function addEnterprise(data) {
  return request({
    url: 'business/add',
    method: 'post',
    data
  })
}

export function updateEnterprise(data) {
  return request({
    url: 'business/update',
    method: 'post',
    data
  })
}

export function getBusinessList(data) {
  return request({
    url: 'business/list',
    method: 'post',
    data
  })
}

export function getContractList(data) {
  return request({
    url: 'contract/list',
    method: 'post',
    data
  })
}

export function getBusinessById(params) {
  return request({
    url: 'business/get',
    method: 'get',
    params
  })
}

export function businessDelete(params) {
  return request({
    url: 'business/delete',
    method: 'get',
    params
  })
}


export function fileDelete(params) {
  return request({
    url: 'file/delete',
    method: 'get',
    params
  })
}

export function fileGet(params) {
  return request({
    url: 'file/get',
    method: 'get',
    params
  })
}

export function contractDownload(params) {
  return request({
    url: 'contract/download',
    method: 'get',
    params
  })
}

export function getSignUrl(params) {
  return request({
    url: 'contract/getSignUrl',
    method: 'get',
    params
  })
}


export function contracLaunch(params) {
  return request({
    url: 'contract/launch',
    method: 'get',
    params
  })
}

export function contracRevoke(params) {
  return request({
    url: 'contract/revoke',
    method: 'get',
    params
  })
}

export function contracUrge(params) {
  return request({
    url: 'contract/urge',
    method: 'get',
    params
  })
}

export function contractlistByBz(params) {
  return request({
    url: 'contract/listByBz',
    method: 'get',
    params
  })
}

export function businessDownload(data) {
  return request({
    url: 'business/download',
    method: 'post',
    data,
    responseType: 'blob'
  })
}


export function batchAdd(data) {
  return request({
    url: 'batch/add',
    method: 'post',
    data
  })
}


export function batchList(data) {
  return request({
    url: 'batch/list',
    method: 'post',
    data
  })
}


export function batchQuery(data) {
  return request({
    url: 'batch/query',
    method: 'post',
    data
  })
}

export function sQuery(data) {
  return request({
    url: 's/query',
    method: 'post',
    data
  })
}

export function queryHis(data) {
  return request({
    url: 's/queryHis',
    method: 'post',
    data
  })
}




export function sListOrg() {
  return request({
    url: 's/listOrg',
    method: 'get'
  })
}

export function sListUser(params) {
  return request({
    url: 's/listUser',
    method: 'get',
    params
  })
}

export function batchDetail(data) {
  return request({
    url: '/batch/detail',
    method: 'post',
    data
  })
}

export function changePassword(data){
  return request({
    url: '/user/changePassword',
    method: 'post',
    data
  })
}